import { Toast } from "antd-mobile"
import { AxiosError } from 'axios'
export function getError(error: unknown) {
  const err = error as AxiosError<{ message: string }>
  Toast.show({
    icon: 'fail',
    content: err.response!.data.message,
    position: 'top',
  })
}